#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
认证相关视图
script name: views
Created on 2020/3/1 14:48 by PyCharm
@author: fujianjian
"""
from flask import jsonify, request

from app.auth import auth_blueprint


@auth_blueprint.route('/login', methods=['post', 'get'])
def login():
    param = request.get_data()
    print('login param', param)
    json_param = request.get_json()
    print('login json param', json_param)
    res = {'code': 200, 'msg': 'success'}
    return jsonify(res)


@auth_blueprint.route('/logout', methods=['post', 'get'])
def logout():
    return jsonify({
        'code': 200,
        'msg': 'logout success'
    })
